package com.kunyi.web.service.file.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.kunyi.web.service.file.entity.domain.Upload;
import org.springframework.stereotype.Repository;

/**
 * @ClassName IDemoMapper
 * @Description demo表交互
 * @Author pengjunjun
 * @Date 2024/03/04
 * @Version 1.0
 **/
@Repository
public interface IUploadMapper extends BaseMapper<Upload> {

    default Upload selectByName(String fileName){
        Upload upload = selectOne(Wrappers.lambdaQuery(Upload.class)
                .eq(Upload::getName,fileName));
        return upload;
    }
}
